# Copyright 2017 ~ 2030 the original author or authors. <wanglsir@gmail.com, 983708408@qq.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Sets the hadoop home
export HADOOP_HOME=/usr/lib/hadoop-current
export HADOOP_PID_DIR="${HADOOP_HOME}/pids"
# Sets hadoop conf dir
export HADOOP_CONF_DIR=/etc/emr/hadoop-conf
# Sets hadoop log dir
export HADOOP_LOG_DIR=/mnt/disk1/log/hadoop-hdfs
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin

EXTRA_JARS_DIR="/opt/apps/extra-jars"
if [ "$HADOOP_CLASSPATH" ]; then
  export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:${EXTRA_JARS_DIR}/*
else
  export HADOOP_CLASSPATH=${EXTRA_JARS_DIR}/*
fi

if [ "JAVA_LIBRARY_PATH" ]; then
  export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native:$JAVA_LIBRARY_PATH
else
  export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native
fi
